<template>
  <div>
    <!-- 底部选项卡 -->
    <!-- <van-tabbar v-model="dactive"  @change="dianji"> -->
    <van-tabbar v-model="active" route>
      <van-tabbar-item
        :icon="item.icon"
        :name="item.name"
        :to="`/${item.name}`"
        v-for="(item, i) of dbdh"
        :key="i"
        >{{ item.title }}</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data() {
    return {
      dbdh: [
        { icon: "home-o", name: "homes", title: "首页" },
        { icon: "apps-o", name: "fenlei", title: "分类" },
        { icon: "orders-o", name: "caipu", title: "菜谱" },
        { icon: "newspaper-o", name: "journalism", title: "新闻" },
        { icon: "manager-o", name: "me", title: "我的" },
      ],
      active: 0,
    };
  },
};
</script>
